createSimpleResultProvider
Creates a result provider that will return values of the given type from valid config scopes matching that type.
This provider will inspect the registered config matching to the scope provided, utilizing the fallback instead if a valid scope isn't provided.
Results are cached per scope provided. The cache is cleared automatically at the end of data pack reload.
Return
ResultProvider to supply results based on passed scopes. This should be created once per use-case (static, companion object, etc), otherwise caching won't be effective.
Author
fzzyhmstrs
Since
0.5.3
Parameters
non-null provider type. Needs to be a type that can actually be provided by a config
T - a fallback value if the scope provided isn't valid. This fallback will be cached against any invalid scope, and an error logged, rather than an exception being thrown.
Creates a result provider that will return values of the given type from valid config scopes matching that type, with a custom Supplier generator instance.
This provider will inspect the registered config matching to the scope provided, utilizing the fallback instead if a valid scope isn't provided.
Results are cached per scope provided. The cache is cleared automatically at the end of data pack reload.
Return
ResultProvider to supply results based on passed scopes. This should be created once per use-case (static, companion object, etc), otherwise caching won't be effective.
Author
fzzyhmstrs
Since
0.5.3
Parameters
non-null provider type. Needs to be a type that can actually be provided by a config
T - supplies a fallback value if the scope provided isn't valid. This fallback will be cached against any invalid scope, and an error logged, rather than an exception being thrown.
ResultProviderSupplierJava - a custom creator of Suppliers for creating scoped results.